package com.mlnx.mptp.model.ecg;

import com.mlnx.mptp.mptp.body.ecg.WearMode;

import java.io.Serializable;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors
public class ECGDeviceInfo implements Serializable{

	private ECGDeviceRunMode ecgDeviceRunMode;

	private ECGChannelType ecgChannelType;

	private Integer packetInterval;

	private Integer batteryLevel;	// 电量

	private Integer signalStrength;	// 信号强度

	private Integer sdRemain;

	private Integer sdCapacity;

	private Integer amplification;	// 放大倍数

	private Integer sampling;

	private Integer probeChannelBias;	// 探头偏压

	private Integer pei;	// 导联情况

	private WearMode wearMode;

	private boolean deviceInfoUpdate = false;

	public ECGDeviceInfo() {
	}

	public void updateECGDeviceInfo(ECGDeviceInfo info) {
		if (info.getEcgDeviceRunMode() != null) {
			setEcgDeviceRunMode(info.getEcgDeviceRunMode());
		}
		if (info.getEcgChannelType() != null) {
			setEcgChannelType(info.getEcgChannelType());
		}
		if (info.getBatteryLevel() != null) {
			setBatteryLevel(info.getBatteryLevel());
		}
		if (info.getSignalStrength() != null) {
			setSignalStrength(info.getSignalStrength());
		}
		if (info.getSdCapacity() != null) {
			setSdCapacity(info.getSdCapacity());
		}
		if (info.getSdRemain() != null) {
			setSdRemain(info.getSdRemain());
		}
		if (info.getSampling() != null) {
			setSampling(info.getSampling());
		}
		if (info.getAmplification() != null) {
			setAmplification(info.getAmplification());
		}
		if (info.getWearMode() != null) {
			setWearMode(info.getWearMode());
		}
		if (info.getProbeChannelBias() != null) {
			setProbeChannelBias(info.getProbeChannelBias());
		}
		if (info.getPei() != null) {
			setPei(info.getPei());
		}
	}

}
